package com.picturestory.client.android.registration;

import com.picturestory.client.android.R;

import android.app.Activity;
import android.content.Intent;
import android.graphics.Typeface;
import android.os.Bundle;
import android.os.Handler;
import android.os.Message;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.Window;
import android.widget.Button;
import android.widget.TextView;
import android.widget.Toast;

public class Consent extends Activity {

	private static final String TAG = Consent.class.getSimpleName();
	
	private Button mNext;
	private TextView mTVTermsOfUseLabel;
	private TextView mTVPrivacyPolicyLabel;
	
	private Bundle userInfo;
	
	private Handler mHandler = new Handler() {

		@Override
		public void handleMessage(Message msg) {
			Intent intent = new Intent(Consent.this, UserInfo.class);
			intent.putExtras(userInfo);
			startActivity(intent);
		}
	};
	
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		// TODO Auto-generated method stub
		super.onCreate(savedInstanceState);
		
		requestWindowFeature(Window.FEATURE_NO_TITLE);
        setContentView(R.layout.consent);
        
        Typeface font = Typeface.createFromAsset(getAssets(), "perpetua.ttf");
        
        mTVPrivacyPolicyLabel = (TextView) findViewById(R.id.consent_privacy_policy_label);
        mTVTermsOfUseLabel = (TextView) findViewById(R.id.consent_terms_of_use_label);
        
        mNext = (Button) findViewById(R.id.consent_next);
        mNext.setOnClickListener(new OnClickListener() {

			@Override
			public void onClick(View arg0) {
				// TODO Auto-generated method stub
				mHandler.handleMessage(mHandler.obtainMessage());
			}
        });
        
        mTVPrivacyPolicyLabel.setTypeface(font);
        mTVTermsOfUseLabel.setTypeface(font);
        mNext.setTypeface(font);
        
        Intent intent = getIntent();
        userInfo = intent.getExtras();
	}

	@Override
	protected void onStart() {
		// TODO Auto-generated method stub
		super.onStart();
		
		
	}

}
